const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  transpileDependencies: true,
  //配置 build
  pluginOptions: {
    electronBuilder: {
      customFileProtocol: "./", //自定义文件协议 引入静态资源 css js ttf
      builderOptions: {
        "appId": "com.example.app",
        "productName": "mo-wallpaper",//项目名，也是生成的安装文件名，即aDemo.exe
        "copyright": "Copyright © 2022",//版权信息
        /*"directories": {
          "output": "./dist"//输出文件路径，之前编译的默认是dist_electron
        },*/
        "nsis":{    //nsis相关配置，打包方式为nsis时生效
          "oneClick": false, 	// 是否一键安装
          "allowElevation": true, 	// 允许请求提升，如果为false，则用户必须使用提升的权限重新启动安装程序。
          "allowToChangeInstallationDirectory": true, 		// 允许修改安装目录
          "installerIcon": "./build/logo64x64.ico",// 安装图标
          "uninstallerIcon": "./build/logo64x64.ico",//卸载图标
          "installerHeaderIcon": "./build/logo64x64.ico",// 安装时头部图标
        },
        "win": {
          "icon": "./build/logo256x256.ico"//这里注意配好图标路径
        }
        // options placed here will be merged with default configuration and passed to electron-builder
      }
    }
  }
})
